
let tabs = document.getElementsByClassName('tab');
for (let i = 0; i < tabs.length; i++) {
  yuan_tab(tabs[i])
}

function yuan_tab(tab) {
  let title = tab.querySelector('.t-title')
  let span = title.querySelectorAll('span')
  let tc = tab.querySelectorAll('.tc')

  for (let i = 0; i < span.length; i++) {
    span[i].index = i
    span[i].onmouseover = function () {
      for (let j = 0; j < span.length; j++) {
        span[j].classList.remove('cur')
        tc[j].style.display = 'none'
      }
      this.classList.add('cur')
      tc[this.index].style.display = 'block'
    }
  }
}